﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class PlayerManager : MonoBehaviour
{
    public static PlayerManager instance;
    private int sunCount;
    private UnityAction SunNum;
    public int SunCount
    {
        get => sunCount;
        set
        {
            sunCount = value;
            UImanager.instance.UpdateSunCount(sunCount);
            SunNum();
        }
    }
    private void Start()
    {
        sunCount = 100;
        instance = this;
    }
    public void AddSun(UnityAction action)
    {
        SunNum += action;
    }
}
